﻿if exists (select * from sysobjects where name like N'%sp_CongTy_Update%')
	drop proc sp_CongTy_Update
go
create proc sp_CongTy_Update
	@MaCongTy varchar(50) = null,
	@TenCongTy nvarchar(255) = null,
	@DiaChi nvarchar(255) = null,
	@DienThoai nvarchar(255) = null,
	@Fax nvarchar(50) = null,
	@Website nvarchar(50) = null,
	@TinhThanh nvarchar(50) = null,
	@QuanHuyen nvarchar(50) = null,
	@GiamDoc nvarchar(50) = null,
	@KeToanTruong nvarchar(50) = null,
	@ThuQuy nvarchar(50) = null,
	@MST varchar(50) = null	, 
	@CoQuanThue nvarchar(100) = null,
	@TaiKhoan varchar(50) = null,
	@NganHang nvarchar(255) = null,
	@MauHD varchar(50) = null,
	@Logo image = null,
	@CreatBy int = null,
	@ModifiedBy int = null,
	@ModifiedOn datetime = null
as
begin 
	update CongTy
	set TenCongTy = @TenCongTy,
		DiaChi = @DiaChi,
		DienThoai = @DienThoai,
		Fax = @Fax,
		Website = @Website,
		TinhThanh = @TinhThanh,
		QuanHuyen = @QuanHuyen,
		GiamDoc = @GiamDoc,
		KeToanTruong = @KeToanTruong,
		ThuQuy = @ThuQuy,
		MST = @MST,
		CoQuanThue = @CoQuanThue,
		TaiKhoan = @TaiKhoan,
		NganHang = @NganHang,
		MauHD = @MauHD,
		Logo = @Logo,
		ModifiedBy = @ModifiedBy,
		ModifiedOn = @ModifiedOn
	where MaCongTy = @MaCongTy
end